import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    path: "/index",
    meta: { title: "系统管理" },
    component: () => import("../views/IndexView.vue"),
    children: [
      {
        path: "/usrMng",
        meta: { title: "用户管理" },
        component: () => import("../views/UsrMngView.vue"),
      },
      {
        path: "/trascMng",
        meta: { title: "交易管理" },
        component: () => import("../views/TrascMngView.vue"),
      },
    ],
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
